﻿using System;

namespace ReadyApps.Common.Exceptions
{
    /// <summary>
    /// Represents errors that occur when a folder outside of the virtual wiki
    /// hierarchy are referenced.
    /// </summary>
    public class UnreachableFolderException : Exception
    {
        /// <summary>
        /// Initializes a new <see cref="UnreachableFolderException"/> with the specified base folder
        /// and the attempted path.
        /// </summary>
        /// <param name="baseFolder">The relative base for current program execution</param>
        /// <param name="attemptedPath">The path that caused the error to be generated</param>
        public UnreachableFolderException(string baseFolder, string attemptedPath)
            : base(string.Format("Unreachable folder detected: cannot get from {0} to {1}.", baseFolder, attemptedPath)) { }
    }
}
